#pragma once
#include "stdafx.h"
#include "goods.h"


Goods::Goods(int new_category, std::string new_name, int new_code, int new_value, int new_quantity)
{
	category=new_category;
	name=new_name;
	code=new_code;
	value=new_value;
	quantity=new_quantity;
}

int Goods::GetPrice(int Portcode)
{
	int LocalValue;
	LocalValue=value;
	return LocalValue;
}

int Goods::GetQuantity(int Portcode, int PortCommercial)
{
	int LocalQuantity;
	if(PortCommercial >= 0 && PortCommercial < 1000)
	{
		LocalQuantity = quantity;
	}
	else if(PortCommercial >= 1000 && PortCommercial < 5000)
	{
		LocalQuantity = quantity*1.5;
	}
	return LocalQuantity;
}

void Goods::Set_goods()
{
	Goods(1,Clove,1,1000,5);
}
